﻿using CodeFirsrtDemo.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeFirsrtDemo.Migrations
{
    public class DeptSeed
    {
        public static void Seed(DataContext context)
        {
            var d1 = new Department()
            {
                SortCode="001",
                Name = "电子信息工程学院",
                Dscn = "软件技术专业____"
            };
            var d2 = new Department()
            {
                SortCode = "002",
                Name = "汽车学院",
                Dscn = ""
            };
            var d3 = new Department()
            {
                SortCode = "003",
                Name = "财经学院",
                Dscn = ""
            };
            var d4 = new Department()
            {
                SortCode = "004",
                Name = "机电学院",
                Dscn = ""
            };
            var d5 = new Department()
            {
                SortCode = "005",
                Name = "艺术学院",
                Dscn = ""
            };
            context.Departments.Add(d1);
            context.Departments.Add(d2);
            context.Departments.Add(d3);
            context.Departments.Add(d4);
            context.Departments.Add(d5);
            context.SaveChanges();
        }
    }
}
